package com.spring.cloud.study.service;

import org.springframework.data.domain.Page;

import java.util.Collection;
import java.util.List;
import java.util.Map;

/**
 * Created with IntelliJ IDEA.
 * User: 齐丹枫
 * Date: 2018/3/1
 * Time: 14:57
 * To change this template use File | Settings | File Templates.
 * Description:
 */
public interface BaseService<T> {

    void save(T t);


    void saveBatch(Collection<T> collection);


    Page<T> findPage(Map<String,Object> map);

    List<T> findBatch(Object[] objects);

    List<T> findBatch(Collection<Integer> collection);

    T findById(int id);

    List<T> findAll();

    void update(T t);

    int delete(T t);

    void delete (int id);
    int deleteBatch(Object[] objects);

    void deleteBatch(Collection<Integer> collection);

}
